package com.cdatos.golGana;

import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

import com.cdatos.golGana.pages.MainPage;
import com.cdatos.golGana.session.GolGanaSession;

/**
 * Application object for your web application. If you want to run this application without deploying, run the Start class.
 * 
 * @see com.cdatos.golGana.Start#main(String[])
 */
public class GolGanaWebApplication extends WebApplication{
	
    /**
     * Constructor
     */
	public GolGanaWebApplication(){
	}
	
	@Override
	protected void init() {
		super.init();
		addComponentInstantiationListener(new SpringComponentInjector(this));
	}
	
	/**
	 * @see org.apache.wicket.Application#getHomePage()
	 */
	public Class<MainPage> getHomePage(){
		return MainPage.class;
	}
	
	@Override
	public Session newSession(Request request, Response response) {
		return new GolGanaSession(request);
	}

}
